package scantask.client.threeDObjects;

import gov.nasa.worldwind.layers.AirspaceLayer;

import java.awt.Color;

import scantask.client.threeDObjects.exceptions.Illegal3DObjectParameter;

public class Cone extends LeafPolygone {
	
	private int _radius;

	public Cone(Color color, double xCenter, double yCenter, double buttom,
			double up, int angle, int radius, double value) throws Illegal3DObjectParameter {
		super(color, xCenter, yCenter, buttom, up, angle, value);
		
		if (radius <= 0) {
			scantask.client.utilities.logging.SingletonLogger.getLogger().warning("Fail illegal radius entered");
			throw new Illegal3DObjectParameter();
		}
		
		this._radius = radius;
	}

	@Override
	public ComponentPolygone clone() {
		ComponentPolygone ans = null;
		try {
			ans = new Cone(this._color, this._xCenter, this._yCenter,
					this._buttom, this._up, this._angle, this._radius, this._value);
		} catch (Illegal3DObjectParameter e) {
			// AdirD - Impossible exception
		}
		
		return ans;
	}

//	@Override
//	public void draw(/** globe **/) {
//		// TODO Auto-generated method stub
//		
//	}
	
	@Override
	public void init3DObject(AirspaceLayer layer){
		super.init3DObject(layer);
		
	}

}
